#pragma once

#include "NeroCore\NAttributed.h"

namespace Core
{
	class NSector;
}

namespace Game
{
	class NGame;
}

namespace Game
{
struct NWorldState
{
	NWorldState()
	{
		CurrentWorld = NULL;
		CurrentSector = NULL;
		CurrentGame = NULL;
	}
	class NWorld* CurrentWorld;
	class Core::NSector* CurrentSector;
	class Game::NGame* CurrentGame;
};

class NWorld : public Core::NAttributed
{
	RTTI_DECLARATIONS(NWorld, Core::NAttributed)

	typedef std::vector<Core::NSector*> SectorList;

public:
	NWorld(void);

	virtual ~NWorld(void);

	void Initialize();

	void Deinitialize();

	NScope& AppendSector(std::string sectorName = "", Core::NSector * parentSector = NULL);

	NScope& GetSectors();

	void SetSector(std::string name);

	void Update(float deltaTime);

	void Render(float deltaTime);

	NWorldState& GetWorldState();

	static NWorldState* WorldState;
private:
	SectorList mSectorList;
	
};
}